package cn.edu.sgu.www.mhxysy.dto.xingyin;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class XingyinCategoryDTO implements DataTransferObject {

	@ApiModelProperty(value = "ID")
	private Integer id;

	/**
	 * 星印名称
	 */
	@NotBlank(message = "星印名称" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "星印名称", required = true)
	private String name;

	/**
	 * 星印类型
	 */
	@Positive(message = "星印类型" + CustomMessages.ILLEGAL)
	@NotNull(message = "星印类型" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "星印类型", required = true)
	private Integer type;

	/**
	 * 星印等级
	 */
	@Range(min = 65, max = 105, message = "星印等级" + CustomMessages.ILLEGAL)
	@NotNull(message = "星印等级" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "星印等级", required = true)
	private Integer grade;
}